Background for Farmers Protest

In September of 2020, Prime Minister Modi passed laws that allowed farmers to sell directly to buyers, which reduced the government’s role in the agricultural sector [2,3]. Farmers called for the laws to be repealed as they feared that removing government support and protections would destroy their livelihoods [2]. This resulted in a year-long series of protests by farmers in India, mostly in the states of Haryana and Punjab [2].

We examined the social media response to these protest events using a dataset of English tweets tagged with #FarmersProtest[4].

Number of Tweets Over Time

We first wanted to explore the changes in the frequency of unique tweets about the protests over time.

#pdf("FarmersTweetsOverTime_Base.pdf", width = 7, height = 4)
uniquetweets %>% 
  group_by(date1) %>% 
  summarise(Ntweets = n()) %>% 
ggplot(aes(x=date1, y=Ntweets)) +
  geom_line()+
  geom_point(alpha = 0.4, size = 1.5) +
  scale_x_date(date_breaks = "months", date_labels = "%b-%y") +
  theme_classic() +
  labs(x = "Date", y = "Number of Tweets", title = "Number of Unique English Tweets About Farmers Protest Over Time") +
  theme(plot.title = element_text(hjust = 0.5), axis.text.x = element_text(angle = 45, hjust = 1), axis.title.x = element_text(size = 12), axis.title.y = element_text(size = 12))

#dev.off()

We can see that there are several spikes in number of tweets over the course of the protests. The largest spike is at the beginning of February 2021. We wanted to better understand the historical context behind these spikes (what protest events and internet shutdowns occurred on those days). Also, we wanted to investigate the tweets themselves to discover what people were saying and which sentiments they were expressing.

Context and Content for Tweets

Farmers Protest events and the corresponding content and sentiment of tweets during those events. Shutdowns and protest timeline events are from [1,3].

January 2021

Events in January 2021

knitr::include_graphics("FarmersTweetsOverTime_Jan.jpg")

Throughout January 2021, the number of tweets remained very low despite the protest events. This suggests that at this point in time, the Farmers protest was not discussed very widely on Twitter.

February 2021

Events in early February 2021

knitr::include_graphics("FarmersTweetsOverTime_FebPart1.jpg")

Rihanna tweeted about the Farmers protest on February 2nd [3], which resulted in increased conversation about the protests on social media and a massive spike in the number of tweets the following day. This demonstrates the influence that a public figure with a large following can have in bringing attention to global issues.

While there is a drop off in the number of tweets following the shutdown on February 6th, it is difficult to determine the direct impact of the shutdown. The dataset [4] only contains English tweets (which may originate outside of India) and these shutdowns are local to specific regions within India.

February 2, 2021

Most common words and principal sentiments for February 2, 2021

p1=ggplot(w2, aes(x = reorder(word, w), y = w)) +
  geom_col(position = "dodge",color="#1DA1F2",fill="#1DA1F2") +
  geom_text(
    aes(label = comma(w)),
    colour = "#14171A", size = 2.5,
      vjust = 0.2,hjust=-0.025)+ theme_classic()+
  theme(axis.text.x = element_text(angle = 90),
        plot.title = element_text(color="black", size=12, face="bold.italic"),
        axis.title.x = element_text(color="#14171A", size=10, face="bold"),
        axis.title.y = element_text(color="#14171A", size=10, face="bold"),
        axis.text = element_text(size = 8))+
  labs(title = "Principal words",
       x = "",
       y = "Number of tweets")+coord_flip(ylim = c(0,25000))+ scale_y_continuous(labels = comma)

p2=ggplot(sentiments1, aes(x = reorder(Sentiment, Prop), y = Prop)) +
  geom_col(position = "dodge",color="#1DA1F2",fill="#1DA1F2") +
  scale_color_manual("#1DA1F2")+
  geom_text(
    aes(label = paste0(Prop,"%")),
    colour = "#14171A", size = 2.5,
    vjust = 0.1, hjust=-0.025
  )+ theme_classic()+
  theme(axis.text.x = element_text(angle = 90),
        plot.title = element_text(color="black", size=12, face="bold.italic"),
        axis.title.x = element_text(color="#14171A", size=10, face="bold"),
        axis.title.y = element_text(color="#14171A", size=10, face="bold"),
        axis.text = element_text(size = 8))+
  labs(title = "Principal sentiments",
       x = "",
       y = "Proportion of tweets")+coord_flip(ylim = c(0,25))


#g=grid.arrange(p1, p2, ncol = 2, widths = c(0.7,0.6))
cowplot::plot_grid(p1, p2, ncol = 2, align = "h",rel_widths = c(1, 1))

##g=cowplot::plot_grid(p1, p2, ncol = 2, align = "h",rel_widths = c(1,1))
#ggsave(file="feb2_v1.jpeg", g) #saves g

February 3, 2021

Most common words and principal sentiments for February 3, 2021

p1=ggplot(w2, aes(x = reorder(word, w), y = w)) +
  geom_col(position = "dodge",color="#1DA1F2",fill="#1DA1F2") +
  geom_text(
    aes(label = comma(w)),
    colour = "#14171A", size = 2.5,
      vjust = 0.2,hjust=-0.025)+ theme_classic()+
  theme(axis.text.x = element_text(angle = 90),
        plot.title = element_text(color="black", size=12, face="bold.italic"),
        axis.title.x = element_text(color="#14171A", size=10, face="bold"),
        axis.title.y = element_text(color="#14171A", size=10, face="bold"),
        axis.text = element_text(size = 8))+
  labs(title = "Principal words",
       x = "",
       y = "Number of tweets")+coord_flip(ylim = c(0,58000))+ scale_y_continuous(labels = comma)



p2=ggplot(sentiments1, aes(x = reorder(Sentiment, Prop), y = Prop)) +
  geom_col(position = "dodge",color="#1DA1F2",fill="#1DA1F2") +
  scale_color_manual("#1DA1F2")+
  geom_text(
    aes(label = paste0(Prop,"%")),
    colour = "#14171A", size = 2.5,
    vjust = 0.1, hjust=-0.025
  )+ theme_classic()+
  theme(axis.text.x = element_text(angle = 90),
        plot.title = element_text(color="black", size=12, face="bold.italic"),
        axis.title.x = element_text(color="#14171A", size=10, face="bold"),
        axis.title.y = element_text(color="#14171A", size=10, face="bold"),
        axis.text = element_text(size = 8))+
  labs(title = "Principal sentiments",
       x = "",
       y = "Proportion of tweets")+coord_flip(ylim = c(0,28))


cowplot::plot_grid(p1, p2, ncol = 2, align = "h", rel_widths = c(1, 1))

#g=cowplot::plot_grid(p1, p2, ncol = 2, align = "h", rel_widths = c(1,1))
#ggsave(file="feb3_v1.jpeg", g) #saves g

Events in mid to late February 2021

knitr::include_graphics("FarmersTweetsOverTime_FebPart2.jpg")

On February 15th, there was a spike in tweets as people spoke out against the arrest of climate activist Disha Ravi [3].

February 15, 2021

Most common words and principal sentiments for February 15, 2021

p1=ggplot(w2, aes(x = reorder(word, w), y = w)) +
  geom_col(position = "dodge",color="#1DA1F2",fill="#1DA1F2") +
  geom_text(
    aes(label = comma(w)),
    colour = "#14171A", size = 2.5,
      vjust = 0.2,hjust=-0.025)+ theme_classic()+
  theme(axis.text.x = element_text(angle = 90),
        plot.title = element_text(color="black", size=12, face="bold.italic"),
        axis.title.x = element_text(color="#14171A", size=10, face="bold"),
        axis.title.y = element_text(color="#14171A", size=10, face="bold"),
        axis.text = element_text(size = 8))+
  labs(title = "Principal words",
       x = "",
       y = "Number of tweets")+coord_flip(ylim = c(0,5000))+ scale_y_continuous(labels = comma)


p2=ggplot(sentiments1, aes(x = reorder(Sentiment, Prop), y = Prop)) +
  geom_col(position = "dodge",color="#1DA1F2",fill="#1DA1F2") +
  scale_color_manual("#1DA1F2")+
  geom_text(
    aes(label = paste0(Prop,"%")),
    colour = "#14171A", size = 2.5,
    vjust = 0.1, hjust=-0.025
  )+ theme_classic()+
  theme(axis.text.x = element_text(angle = 90),
        plot.title = element_text(color="black", size=12, face="bold.italic"),
        axis.title.x = element_text(color="#14171A", size=10, face="bold"),
        axis.title.y = element_text(color="#14171A", size=10, face="bold"),
        axis.text = element_text(size = 8))+
  labs(title = "Principal sentiments",
       x = "",
       y = "Proportion of tweets")+coord_flip(ylim = c(0,25))

cowplot::plot_grid(p1, p2, ncol = 2, align = "h", rel_widths = c(1,1))

#g=cowplot::plot_grid(p1, p2, ncol = 2, align = "h", rel_widths = c(1,1))
#ggsave(file="feb15_v1.jpeg", g) #saves g

July 2021

Events in July 2021

knitr::include_graphics("FarmersTweetsOverTime_Jul.jpg")

We see that there was spike on July 22nd, when there was a sit-in at a historic observatory in Dehli [3].

July 22, 2021

Most common words and principal sentiments for July 22, 2021

p1=ggplot(w2, aes(x = reorder(word, w), y = w)) +
  geom_col(position = "dodge",color="#1DA1F2",fill="#1DA1F2") +
  geom_text(
    aes(label = comma(w)),
    colour = "#14171A", size = 2.5,
      vjust = 0.2,hjust=-0.025)+ theme_classic()+
  theme(axis.text.x = element_text(angle = 90),
        plot.title = element_text(color="black", size=12, face="bold.italic"),
        axis.title.x = element_text(color="#14171A", size=10, face="bold"),
        axis.title.y = element_text(color="#14171A", size=10, face="bold"),
        axis.text = element_text(size = 8))+
  labs(title = "Principal words",
       x = "",
       y = "Number of tweets")+coord_flip(ylim = c(0,3000))+ scale_y_continuous(labels = comma)



p2=ggplot(sentiments1, aes(x = reorder(Sentiment, Prop), y = Prop)) +
  geom_col(position = "dodge",color="#1DA1F2",fill="#1DA1F2") +
  scale_color_manual("#1DA1F2")+
  geom_text(
    aes(label = paste0(Prop,"%")),
    colour = "#14171A", size = 2.5,
    vjust = 0.1, hjust=-0.025
  )+ theme_classic()+
  theme(axis.text.x = element_text(angle = 90),
        plot.title = element_text(color="black", size=12, face="bold.italic"),
        axis.title.x = element_text(color="#14171A", size=10, face="bold"),
        axis.title.y = element_text(color="#14171A", size=10, face="bold"),
        axis.text = element_text(size = 8))+
  labs(title = "Principal sentiments",
       x = "",
       y = "Proportion of tweets")+coord_flip(ylim = c(0,25))

cowplot::plot_grid(p1, p2, ncol = 2, align = "h", rel_widths = c(1,1))

#g=cowplot::plot_grid(p1, p2, ncol = 2, align = "h", rel_widths = c(1,1))
#ggsave(file="july22_v1.jpeg", g) #saves g

September 2021

Events in September 2021

knitr::include_graphics("FarmersTweetsOverTime_Sep.jpg")

On September 5th, one of the largest demonstrations during the Farmers Protest occurred along with a spike in the number of tweets [3]. Following the demonstration, there was a shutdown on September 7th [1], which may have played a part in the subsequent dip in the number of tweets.

September 5, 2021

Most common words and principal sentiments for September 5, 2021

p1=ggplot(w2, aes(x = reorder(word, w), y = w)) +
  geom_col(position = "dodge",color="#1DA1F2",fill="#1DA1F2") +
  geom_text(
    aes(label = comma(w)),
    colour = "#14171A", size = 2.5,
      vjust = 0.2,hjust=-0.025)+ theme_classic()+
  theme(axis.text.x = element_text(angle = 90),
        plot.title = element_text(color="black", size=12, face="bold.italic"),
        axis.title.x = element_text(color="#14171A", size=10, face="bold"),
        axis.title.y = element_text(color="#14171A", size=10, face="bold"),
        axis.text = element_text(size = 8))+
  labs(title = "Principal words",
       x = "",
       y = "Number of tweets")+coord_flip(ylim = c(0,3000))+ scale_y_continuous(labels = comma)


p2=ggplot(sentiments1, aes(x = reorder(Sentiment, Prop), y = Prop)) +
  geom_col(position = "dodge",color="#1DA1F2",fill="#1DA1F2") +
  scale_color_manual("#1DA1F2")+
  geom_text(
    aes(label = paste0(Prop,"%")),
    colour = "#14171A", size = 2.5,
    vjust = 0.1, hjust=-0.025
  )+ theme_classic()+
  theme(axis.text.x = element_text(angle = 90),
        plot.title = element_text(color="black", size=12, face="bold.italic"),
        axis.title.x = element_text(color="#14171A", size=10, face="bold"),
        axis.title.y = element_text(color="#14171A", size=10, face="bold"),
        axis.text = element_text(size = 8))+
  labs(title = "Principal sentiments",
       x = "",
       y = "Proportion of tweets")+coord_flip(ylim = c(0,25))

cowplot::plot_grid(p1, p2, ncol = 2, align = "h", rel_widths = c(1,1))

#g=cowplot::plot_grid(p1, p2, ncol = 2, align = "h", rel_widths = c(1,1))
#ggsave(file="sept05_v1.jpeg", g) #saves g

November 2021

Events in November 2021

knitr::include_graphics("FarmersTweetsOverTime_Nov.jpg")

We see the second largest spike in the number of tweets during the Farmers Protest on November 19th, when Prime Minister Modi finally repeals the laws that the farmers have been protesting.

November 19, 2021

Most common words and principal sentiments for November 19, 2021

p1=ggplot(w2, aes(x = reorder(word, w), y = w)) +
  geom_col(position = "dodge",color="#1DA1F2",fill="#1DA1F2") +
  geom_text(
    aes(label = comma(w)),
    colour = "#14171A", size = 2.5,
      vjust = 0.2,hjust=-0.025)+ theme_classic()+
  theme(axis.text.x = element_text(angle = 90),
        plot.title = element_text(color="black", size=12, face="bold.italic"),
        axis.title.x = element_text(color="#14171A", size=10, face="bold"),
        axis.title.y = element_text(color="#14171A", size=10, face="bold"),
        axis.text = element_text(size = 8))+
  labs(title = "Principal words",
       x = "",
       y = "Number of tweets")+coord_flip(ylim = c(0,9000))+ scale_y_continuous(labels = comma)


p2=ggplot(sentiments1, aes(x = reorder(Sentiment, Prop), y = Prop)) +
  geom_col(position = "dodge",color="#1DA1F2",fill="#1DA1F2") +
  scale_color_manual("#1DA1F2")+
  geom_text(
    aes(label = paste0(Prop,"%")),
    colour = "#14171A", size = 2.5,
    vjust = 0.1, hjust=-0.025
  )+ theme_classic()+
  theme(axis.text.x = element_text(angle = 90),
        plot.title = element_text(color="black", size=12, face="bold.italic"),
        axis.title.x = element_text(color="#14171A", size=10, face="bold"),
        axis.title.y = element_text(color="#14171A", size=10, face="bold"),
        axis.text = element_text(size = 8))+
  labs(title = "Principal sentiments",
       x = "",
       y = "Proportion of tweets")+coord_flip(ylim = c(0,25))


cowplot::plot_grid(p1, p2, ncol = 2, align = "h", rel_widths = c(1,1))

#g=cowplot::plot_grid(p1, p2, ncol = 2, align = "h", rel_widths = c(1,1))
#ggsave(file="nov19_v1.jpeg", g) #saves g

Changes in Tweet Sentiment Over Time

Change in principal sentiments over the course of the protests

knitr::include_graphics("Sentiment_AcrossTime.jpg")

Limitations

One limitation we faced was that the tweet dataset that we used was only for English tweets about the Farmers Protest. Investigating tweets about the protests in other languages may reveal further insights.